<?php

namespace frontend\base;

use common\base\BaseController;
use common\services\AccessLogServices;
use Yii;
use yii\base\Theme;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
use yii\filters\VerbFilter;
use yii\filters\AccessControl;
use yii\helpers\Url;
use yii\log\Logger;

class BaseFrontController extends BaseController
{

    public function init()
    {
        parent::init();
        $userId = '';
        if (!Yii::$app->user->getIsGuest()) {
            $userId = Yii::$app->user->getId();
        }
        //添加页面访问日志
        //$logService = new AccessLogServices();
        //$logService->insertAccessLog('pc', $userId);
    }

    /**
     * {@inheritdoc}
     */
    public function behaviors()
    {
        return [];
    }
}